NVCC = /usr/local/cuda/bin/nvcc -O2   -g -I/usr/local/cuda/samples/common/inc
CC   = g++ -g -Wall -std=c++11
LINKER = /usr/local/cuda/bin/nvcc
DEVELOPMENT_ARCHITECT = -gencode arch=compute_20,code=sm_21
PRODUCTION_ARCHITECT = -gencode arch=compute_30,code=sm_30

all_development:
	$(NVCC) $(DEVELOPMENT_ARCHITECT) -c A51CudaKernel.cu
	$(NVCC) $(DEVELOPMENT_ARCHITECT) -c A51CudaSlice.cu
	$(NVCC) $(DEVELOPMENT_ARCHITECT) -c Advance.cpp
	$(NVCC) $(DEVELOPMENT_ARCHITECT) -c A51Cuda.cpp
	$(NVCC) $(DEVELOPMENT_ARCHITECT) -c main.cpp
	$(NVCC) $(DEVELOPMENT_ARCHITECT) -o test A51CudaKernel.o A51CudaSlice.o Advance.o A51Cuda.o main.o  -L/usr/lib64 -lboost_system -lboost_thread

all_production:
	$(NVCC) $(PRODUCTION_ARCHITECT) -c A51CudaKernel.cu
	$(NVCC) $(PRODUCTION_ARCHITECT) -c A51CudaSlice.cu
	$(NVCC) $(PRODUCTION_ARCHITECT) -c Advance.cpp
	$(NVCC) $(PRODUCTION_ARCHITECT) -c A51Cuda.cpp
	$(NVCC) $(PRODUCTION_ARCHITECT) -c main.cpp
	$(NVCC) $(PRODUCTION_ARCHITECT) -o test A51CudaKernel.o A51CudaSlice.o Advance.o A51Cuda.o main.o  -L/usr/lib64 -lboost_system -lboost_thread-mt

test_kernel:
	$(NVCC) -c -g A51CudaKernel.cu
	$(NVCC) -c unitTest_kernel.cu
	$(LINKER) -o kernel_test A51CudaKernel.o unitTest_kernel.o
